<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="google" value="notranslate">
  <meta name="viewport" content="width=device-width, user-scalable=no">
  <title>BIPES Project</title>
  <link rel="apple-touch-icon" sizes="180x180" href="/media/apple-touch-icon.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/media/icon/favicon-32x32.png">
  <link rel="mask-icon" href="/media/icon/safari-pinned-tab.svg" color="#5bbad5">
  <meta name="theme-color" content="#fff">

  <!-- Progressive Web Application setup -->
  <link rel="manifest" href="manifest.json"></link>
  <script src="core/manup.js"></script>
  <!-- End of Progressive Web Application setup -->



  <!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-162001686-1"></script>



<script>


function setCookie(cname, cvalue, cpassword_value, exdays) {
  var d = new Date();
  d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
  var expires = "expires="+d.toUTCString();
  document.cookie = cname + "=" + cvalue + "&"+ "last_pass="+ cpassword_value + ";" + expires + ";path=/";
}

function getCookie(cname) {
  var name = cname + "=";
  var ca = document.cookie.split(';');
  console.log(ca)
  for(var i = 0; i < ca.length; i++) {
    var c = ca[i];
    while (c.charAt(0) == ' ') {
      c = c.substring(1);  
    }
    if (c.indexOf(name) == 0) {
      return c.substring(name.length, c.length);
    }
  }
  return "";
}

function checkCookie() {
  var cookies = getCookie("last_ip");
  if (cookies != "") {
    var cookies_ = cookies.split('&')
    document.getElementById('url').value = cookies_[0]
    document.getElementById('password').value = cookies_[1].substring("last_pass=".length, cookies_[0].length)
  } 
  
}
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-162001686-1');
</script>
  <link rel="stylesheet" href="style.css?ver=0.2.3.841940">
  <link rel="stylesheet" href="core/libs.css">
  <script src="core/storage.js?ver=0.2.2.1125"></script>
  <script src="core/blockly_compressed.js?ver=0.2.1.841940"></script>
  <script src="core/blocks_compressed.js?ver=0.2.1.841940"></script>
  <script src="core/javascript_compressed.js?ver=0.2.1.841940"></script>
  <script src="core/python_compressed.js?ver=0.2.3.9292231"></script>
  <script src="core/code.js?ver=0.2.3.841940"></script>
  <script src="core/channel.js?ver=0.2.3.841940"></script>
  <script src="core/utils.js?ver=0.2.3.841940"></script>
  <script src="core/ui.js?ver=0.2.3.841940"></script>
  <script src="core/queue.js"></script>
  <script src="core/FileSaver.js"></script>
  <script src="core/shortcut.js"></script>
  <script src="pylibsBlobs/main.js"></script>
  <script src="pylibsBlobs/ssd1306.js"></script>
  <script src="pylibsBlobs/rtttl.js"></script>
  <script src="pylibsBlobs/songs.js"></script>
  <script src="pylibsBlobs/hcsr04.js"></script>


  <!-- Custom Blocks for BIPES Project --> 
  <script src="core/block_definitions.js?ver=0.2.3.11011813"></script> <!-- Rafael 24/03/2020 -->
  <script src="core/generator_stubs.js?ver=0.2.3.11011813"></script> <!-- Rafael 24/03/2020 -->

  <!-- xterm part -->
  <script src="core/xterm.js?ver=4.13.0"></script>

  <!-- Codemirror -->
  <script src="core/codemirror/codemirror.js"></script>
  <script src="core/codemirror/mode/python/python.js"></script>

  <!-- Progressive Web Application setup -->
  <script type="module">
  // This is the "Offline copy of pages" service worker

/*
 This code uses the pwa-update web component https://github.com/pwa-builder/pwa-update to register your service worker, tell the user when there is an update available and let the user know when your PWA is ready to use offline.

*/

import 'https://cdn.jsdelivr.net/npm/@pwabuilder/pwaupdate';
const el = document.createElement('pwa-update');
document.body.appendChild(el);

</script>

  <!-- End of Progressive Web Application setup -->


  <!-- From https://github.com/rafaelaroca/blockly-cv2 for OpenCV  --> 
  <!-- 
  <script src="jsCv/en.js"></script>
  <script src="jsCv/cv2.js"></script>
  -->
  <script src="jsCv/v30.js"></script>
  <script src="jsCv/v30/python.js"></script>
  <script src="jsCv/v30/blocks.js"></script>


</head>
<body>

  <div class="top-menu">

    <div class="logo">BIPES</div>
      <div class="tabs">
        <div id="tab_blocks" class="tabon">...</div>
        <div id="tab_console" class="taboff">Console</div>
        <div id="tab_files" class="taboff">...</div>
        <div id="tab_programs" class="taboff">...</div>
        <div id="tab_device" class="taboff">...</div>
        <div id="tab_iot" class="taboff">IOT</div>
        <div id="tab_mqtt" class="taboff" onclick='document.getElementById("easymqtt_iframe").contentWindow.startEasyMQTT(window.easyMQTT_session);'>EasyMQTT</div>
        <div id="tab_databoard" class="taboff">Databoard</div>
      </div>
      <button id="toolbarButton" class="notext icon medium" title="..."></button>
      <div class="toolbar">
      <div id="channel_connect">
        <button class="icon" id="channelButton" title="Choose connection channel"></button>
        <button class="icon" id="connectButton" title="Connect/Disconnect"></button>
      </div>
      <div class="icon" id="deviceSelect">
        <select id="device_selector">
          <option value="3PI_2040">Pololu 3pi+ 2040 Robot</option>
          <option value="ESP8266">ESP8266</option>
          <option value="ESP32S2">Franzininho Wifi (ESP32S2+CircuitPython)</option>
          <option value="ESP8266">Wemos D1 mini</option>
          <option value="ESP32">ESP32</option>
          <option value="ESP32basic">ESP32 (Basic)</option>
          <option value="M5STICK">m5stick (ESP32)</option>
          <option value="Nucleo">ST Nucleo (mBed)</option>
          <option value="BBBlack">Beagle Bone Black</option>
          <option value="BBC">BBC Microbit</option>
          <option value="RPI4">Raspberry Pi (any Linux)</option>
          <option value="RPI_Pico">Raspberry Pi Pico</option>
          <option value="RPI_Pico_W">Raspberry Pi Pico W</option>
          <option value="MakerPi">Maker Pi RP2040</option>
          <option value="RPI_PicoETH">W5100S-EVB-Pico (RP2040)</option>
          <option value="UNO">Arduino UNO or MEGA (Snek @ 38400)</option>
          <option value="UNO2">Arduino UNO or MEGA (Snek @ 115200)</option>
          <option value="EV3">Lego EV3</option>
          <option value="pion_cansat">PION CanSat (ESP32)</option>
          <option value="pion_cubesat">PION CubeSat (ESP32)</option>
          <option value="vespa">RoboCore Vespa (ESP32)</option>
        </select>
        <button id="runButton" class="notext primary icon" title="..."></button>
      </div>

        <button id="linkButton" class="notext icon" title="..."></button>

        <button id="saveButton" class="notext icon" title="..."></button>

        <label id="loadButton" for="loadXML"  class="notext button icon" title="..."></label>
        <input name="XML" id="loadXML" type="file" accept=".xml" required="">

        <!--<button id="trashButton" class="notext icon" title="..."></button>-->

        <button id="notificationButton" class="notext icon" title="..."></button>

        <button id="forumButton" class="notext icon" title="..."></button>

        <button id="accountButton" class="notext icon" title="..."></button>
      </div>
    </div>

  <div class='channel-panel'>
    <button class='icon' id="bluetoothButton">Bluetooth</button>
    <div>
      <button class='icon' id="serialButton">Serial</button>
      <label for="resetBoard" class="checkswitch">
        Reset on connect
        <input type="checkbox" id="resetBoard" class="checkswitch" value="off">
        <span></span>
      </label>
    </div>
    <div>
      <button class='icon' id="networkButton">Network</button>
      <span>
      Address: <input type="text" name="webrepl_url" id="url" value="ws://192.168.0.35:8266/" />
      Password: <input type="password" name="webrepl_pass" id="password" value="bipes" />
      </span>
      <button class="icon" value="Scan boards" id="scanButton" onclick="window.open('ports.html','popup','width=600,height=600'); return false;" target="popup">Scan devices</button>
    </div>
  </div>

  <div id="content_blocks" class="content"></div>
  <div id="content_console" class="content">
       <span class="icon" id="tipsGeneric"><tt>Ctrl+Insert</tt> to copy and <tt>Shift+Insert</tt> to paste</span>
    <tr height="25%" id="termTR">
     <td>
        <div style="display:inline-block; vertical-align:top; ">
    <div id="term" class="xterm">
            </div>
        </div>
     </td>
     <td>
        <div id="file-boxes" >

            <button onclick="Tool.runPython(); return false;">Run block based program</button>
      <br>
      <br>
            <button onclick="Tool.stopPython(); return false;">Stop running program</button>
            <button onclick="Tool.softReset(); return false;">Soft reset device</button>
      <br>
      <br>
      <button  onclick="Files.run(UI ['workspace'].content_file_name.value); return false;">Run edited Python File</button>
      <br>
      <br>
      <button onclick="term.write('\x1bc');  ">Clear terminal output</button>

      <!--
            <div class="file-box">
                <strong>Send a file</strong>
                <input type="file" id="put-file-select" />
                <div id="put-file-list"></div>
                <input type="button" value="Send to device" id="put-file-button" onclick="Files.put_file(); return false;" />
            </div>
          <div class="file-box">
            <strong>Get a file</strong>
            <input type="text" name="get_filename" id="get_filename" value="" size="13" />
            <input type="button" value="Get from device" onclick="get_file(); return false;" />
        </div>
        <div class="file-box" id="file-status"><span style="color:#707070">(file operation status)</span></div>
      -->
    </div>
    <label for="EasyMQTT_bridge" class="checkswitch">
        Bridge data to EasyMQTT
        <input type="checkbox" id="EasyMQTT_bridge" class="checkswitch" value="off">
        <button id="settingsGeneric" class="notext icon" title="Configure EasyMQTT bridge" style="height: 1.5rem; padding: 0 0.25rem;" onclick="window.open('easymqtt_bridge.html','popup','width=600,height=600'); return false;" target="popup"></button>
        <span></span>
      </label>
    </td>
   </tr>
</div>

<!-- ################################################## -->

  <div id="content_programs" class="content">
    <center>
	    <!--
    <iframe src="https://bipes-271213.appspot.com/list" width="100%" height="500" frameBorder="0"></iframe>
	    -->
    <iframe src="shared.html" width="100%" height="500" frameBorder="0"></iframe>
    </center>
  </div>


<!-- ################################################## -->

  <div id="content_device" class="content">
    <center>
      <label id="device_title"><b>ESP8266</b><br></label>
    <br>
    <img id="device_img" src="devinfo/Node-MCU-ESP-12E-Pin-Out-Diagram2.jpg">
    <br>

    <label id="device_desc">
	      <BR><BR><input type='button' onclick='loadDoc();' value='Open Documentation' /> <BR><BR>To use ESP8266, simply connecto to MicroPython board using Wifi. Micropython must be previously installed on the board. Follow these instructions to install it.
    </label>

    </center>

  </div>


<!-- ################################################## -->

  <div id="content_files" class="content">


  <div id="file-boxes">
  <div id="file-header">
    <span>File manager</span>
    <label id="putFileButton" for="put-file-select"  class="noteaxt button icon" title="Upload script to device"></label>
    <input name="PutFileList" id="put-file-select" type="file" accept=".md,.py" required="">
    <!--<input type="button" value="Run Blocks" onclick="Tool.runPython(); return false;" />-->

  </div>
  <!--<input type="button" value="Blocks to editable Python (here)" onclick="Tool.blocksToPython(); return false;" />-->


  <!--<div class="file-box">
  <strong>Send a file</strong>
  <input type="file" id="put-file-select" />
  <div id="put-file-list"></div>
  <input type="button" value="Send to device" id="put-file-button" onclick="Files.put_file(); return false;" />
  </div>-->
  <div id="file-status">...</div>
  <span id='filesPanel'>
  <details open>
  <summary>
  <h2>On device</h2>
  <button value="List Files" id="refreshFilesList" class="notext button icon" title="Refresh device file list" onclick="Files.listFiles();" /></button>
  </summary>
  <span id='fileList'>...</span>
  </details>
  <details open>
  <summary><h2>Blocks to code</h2></summary>
  <span id='blocks2Code'>
    <div id='blocks2codePython' title="Code generated by the blocks with Blockly."></div>
    <div id='blocks2codeXML' title="BIPES files with all blocks and configuration, like freeboard workspace.">workspace.bipes.xml<span>internal</span></div>
  </span></details>
  <details>
  <summary><h2>Templates</h2></summary>
  <span id='fileTemplate'>
    <div onclick="Tool.getText('main.py');">main.py</div>
    <div onclick="Tool.getText('ssd1306.py');">ssd1306.py</div>
  </span>
  </details>
  </div>


  <div>

  <div id="file_save_as" class="py">
  <input type=text id=content_file_name placeholder="Filename">
  <button id="editor2DeviceButton" class="button icon text" onclick="Files.files_save_as();">Save</button>
  <button id="generated2DeviceButton" class="button icon text" onclick="Files.file_save_as.className = 'py';  Files.files_save_as ();">Save a copy</button>
  <button id="updateXMLButton"  class="button icon text" onclick="Files.editedXML2Workspace();">Push to workspace</button>
  </div>
  <textarea id="content_file_code" wrap="off"></textarea>

  <link rel="stylesheet" href="core/codemirror/codemirror.css">
  </div>
</div>

<!-- ################################################## -->

  <div id="content_iot" class="content">
     <iframe id="content_iot" src="freeboard/index.html" width="100%" height="100%" frameBorder="0"></iframe>
  </div>

<!-- ################################################## -->

<div id="content_mqtt" class="content" style="padding: 0;">
  <iframe id="easymqtt_iframe" src="../easymqtt/index.html" width="100%" height="100%" frameBorder="0"></iframe>
</div>

<!-- ################################################## -->

<div id="content_databoard" class="content" style="padding: 0;">
  <iframe id="databoard_iframe" src="../databoard/index.html" width="100%" height="100%" frameBorder="0"></iframe>
</div>

<!-- ################################################## -->

</div>
<div class='progress-bar'></div>
<div class="notify"></div>
<div class="notify-panel"></div>
<div class="account-panel">
  <span>
    <span id="account_header">Hello, <span id="account_user" role="textbox" contenteditable>User</span>!</span>
    <details open>
    <summary>
    <h2>Projects</h2>
    <button value="New Project" id="newProjectButton" class="notext button icon" title="Create new project" onclick="/*UI ['workspace'].newProject();*/" /></button>
    </summary>
    <span id='ProjectList'></span>
    </details>
  </span>
  <details open>
  <summary>
  <h2>Settings</h2>
  </summary>
  <span class="icon" id="languageIcon">
  <select id="languageMenu"></select>
  </span>
  </details>
</div>

<script>

// Init blockly
Code.init ();

/* global WebSocket, WebSerial and Bluetooth variable and functions (see core/channel.js) */
var Channel = {};
Channel ['websocket'] = new websocket ();
Channel ['webserial'] = new webserial ();
Channel ['webbluetooth'] = new webbluetooth ();
Channel ['mux'] = new mux ();

//global terminal variable
var terminal = new Terminal ();
term.init('#term') //init expanded class;

//global Utilities variable and functions (see core/utils.js)
var Files = new files ('#fileList');

// global User Interface variable and functions (see core/ui.js) */
var UI = {};
UI ['responsive'] = new responsive ();
UI ['notify'] = new notify ();
UI ['progress'] = new progress ();
UI ['account'] = new account ('#accountButton','.account-panel');
UI ['notify-panel'] = new panel ('#notificationButton','.notify-panel');
UI ['channel-panel'] = new channelPanel ('#channelButton','.channel-panel');
UI ['toolbar'] = new panel ('#toolbarButton','.toolbar');
UI ['workspace'] = new workspace ();

bufferPush = mux.bufferPush;


//Make sure we wont use data from last session (BIPES serial to freeboard bridge)
Tool.clearQueue ();

window.onload = function() {
	checkCookie()
	loadPage(); //Load modal splash screen

	//i18n
	//Auto detect user language (from the browser)
	var userLang = navigator.language || navigator.userLanguage + " ";
	//alert ("The language is: " + userLang);
	var addMsg="";

	//Also, detect language from the URL
	const queryString = window.location.search;
	const urlParams = new URLSearchParams(queryString);
	pLang = urlParams.get('lang')

	if (!userLang)
		userLang='en';
	if (!pLang)
		pLang='en';

	if ((userLang.startsWith("pt")) || (pLang.startsWith("pt"))) {	
		addMsg="<p><a href=/beta2/ui/?lang=pt-br>Acessar o BIPES em Português</a>";
		addMsg+=" | <a href=/beta2/ui/?lang=en>Access BIPES in English</a>";
	}

	if (MSG["splash_welcome"]) 
		document.getElementById("modalTitle").innerHTML = MSG["splash_welcome"];
	else
		document.getElementById("modalTitle").innerHTML = "Welcome to BIPES!";

	if (MSG["splash_message"]) 
		document.getElementById("modalMsg").innerHTML = MSG["splash_message"] + addMsg;
	else
		document.getElementById("modalMsg").innerHTML = "<p><b>**BIPES: Block based Integrated Platform for Embedded Systems</B> allows text and block based programming for several types of embedded systems and Internet of Things modules using MicroPython, CircuitPython, Python or Snek. You can connect, program, debug and monitor several types of boards using network, USB or Bluetooth. Please check a list of <a href=https://bipes.net.br/wp/boards/>compatible boards here</a>. Compatible boards include STM32, ESP32, ESP8266, Raspberry Pi Pico and even Arduino.  <p><b>BIPES</b> is fully <a href=https://bipes.net.br/wp/development/>open source</a> and based on HTML and JavaScript, so no software install or configuration is needed and you can use it offline! We hope BIPES is useful for you and that you can enjoy using BIPES. If you need help, we now have a <a href=https://github.com/BIPES/BIPES/discussions>discussion forum</a>, where we also post <a href=https://github.com/BIPES/BIPES/discussions/categories/announcements>new features and announcements about BIPES</a>. Feel free to use it! Also, we invite you to use the forum to leave feedbacks and suggestions for BIPES!</p><p>Checkout BIPES Book: <a href=https://bipes.net.br/wp/book-livro/>https://bipes.net.br/wp/book-livro/</a></p> <p>Thank you from the BIPES Team!</p>" + addMsg;

	if (MSG["splash_footer"]) 
		document.getElementById("modalFooter").innerHTML = MSG["splash_footer"];
	else
		document.getElementById("modalFooter").innerHTML = "Do not show this screen again";

	if (MSG["splash_close"]) 
		document.getElementById("modalClose").innerHTML = MSG["splash_close"];
	else
		document.getElementById("modalClose").innerHTML = "Close";



	//if (userLang.startsWith("pt")) {
	//	//alert("pt");
	//	document.getElementById("modalTitle").innerHTML = MSG["splash_welcome"];
	//} else {
	//	//alert("en");
	//	if (MSG["splash_welcome"]) {
	//		document.getElementById("modalTitle").innerHTML = MSG["splash_welcome"];
	//	}
	//	else {
	//		document.getElementById("modalTitle").innerHTML = "Welcome to BIPES!";
	//	}
	//}

	//BIPES keyboad hotkeys
	//Source: http://www.openjs.com/scripts/events/keyboard_shortcuts/
	//Includes core/shortcut.js
	shortcut.add("Ctrl+Shift+L",function() {
		//alert("BIPES hotkey: screenshot!");
		Tool.exportScreenshot();
	});

	shortcut.add("Ctrl+Shift+E",function() {
		//alert("BIPES hotkey: Run program and switch to console!");
		Code.handleLink('console',1)
		Tool.runPython();
	});

	shortcut.add("Ctrl+Shift+R",function() {
		//alert("BIPES hotkey: Run program!");
		Tool.runPython();
	});

	shortcut.add("Ctrl+Shift+S",function() {
		//alert("BIPES hotkey: Stop program!");
		Tool.stopPython();
	});



};






</script>


<!--
	Start of modal Splash Screen
-->

<style>
body {font-family: Arial, Helvetica, sans-serif;}

/* The Modal (background) */
.modal {
display: none; /* Hidden by default */
position: fixed; /* Stay in place */
z-index: 1000000; /* Sit on top - amazing, but Blockly has z-index up to 100000*/
padding-top: 100px; /* Location of the box */
left: 0;
top: 0;
width: 100%; /* Full width */
height: 100%; /* Full height */
overflow: auto; /* Enable scroll if needed */
background-color: rgb(0,0,0); /* Fallback color */
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

/* Modal Content */
.modal-content {
position: relative;
background-color: #fefefe;
margin: auto;
padding: 0;
border: 1px solid #188;
width: 80%;
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
-webkit-animation-name: animatetop;
-webkit-animation-duration: 0.4s;
animation-name: animatetop;
animation-duration: 0.4s
}

/* Add Animation */
@-webkit-keyframes animatetop {
	  from {top:-300px; opacity:0} 
	    to {top:0; opacity:1}
}

@keyframes animatetop {
	  from {top:-300px; opacity:0}
	    to {top:0; opacity:1}
}

/* The Close Button */
.closeM {
color: white;
float: right;
font-size: 28px;
font-weight: bold;
}

.closeM:hover,
.closeM:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}

.modal-header {
padding: 2px 16px;
background-color: #4d4dff;
color: white;
}

.modal-body {padding: 2px 16px;}

.modal-footer {
padding: 2px 16px;
background-color: #4d4dff;
color: white;
}
</style>


<!-- Trigger/Open The Modal 
	For testing only

<body onload="loadPage()">
<button id="myBtn">Open Modal SplashScreen</button>

BIPES
-->
</div>



		<!-- The Modal -->
		<div id="myModal" class="modal">

			  <!-- Modal content -->
			    <div class="modal-content">
				        <div class="modal-header">
						      <span class="closeM">&times;</span>
						      <h2><span id="modalTitle"></span></h2>
							        </div>
								    <div class="modal-body">
									    <span id="modalMsg"></span>


											    </div>
											        <div class="modal-footer">
													      
													<br>
													<center>
														<input type="checkbox" name="checkfield" id="g01-01"  onchange="doalert(this)"/>
														<span id="modalFooter"></span>
														<br>
														<br>
														<button onclick="closeModal()"><span id="modalClose"></span></button>

													<br>
													<br>
													          </div>
														    </div>


<script>
		// Get the modal
var modal = document.getElementById("myModal");

// Get the button that opens the modal
//var btn = document.getElementById("myBtn");

// Get the <span> element that closes the modal
var span = document.getElementsByClassName("closeM")[0];

// When the user clicks the button, open the modal 
//btn.onclick = function() {
//	  modal.style.display = "block";
//}

// When the user clicks on <span> (x), close the modal
span.onclick = function() {
	  modal.style.display = "none";
}


// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
	  if (event.target == modal) {
		      modal.style.display = "none";
		    }
}

function closeModal() {
	  modal.style.display = "none";
}

function loadPage() {
	var x = getCookieModal('BIPES_Splash');
	if (x) {
		console.log('Not showing splash');
	} else {
		console.log('Showing splash');
		modal.style.display = "block";
	}
}

function doalert(checkboxElem) {

	if (checkboxElem.checked) {
		setCookieModal('BIPES_Splash','BIPES_SplashC',1);
		console.log('Modal Cookie Set');
	} else {
		eraseCookieModal('BIPES_Splash');
		console.log('Modal Cookie deleted');
	}
}


function setCookieModal(name,value,days) {
    var expires = "";
    if (days) {
        var date = new Date();
        date.setTime(date.getTime() + (days*24*60*60*1000));
        expires = "; expires=" + date.toUTCString();
    }
    document.cookie = name + "=" + (value || "")  + expires + "; path=/";
}

function getCookieModal(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}

function eraseCookieModal(name) {   
    document.cookie = name +'=; Path=/; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';
}

</script>



<!--
	End of modal Splash Screen
-->




</html>



